<template>
  <div id="app">
    <div class="elmain">
      <router-view/>
      <div style="height:200px;background-color: #2c3e50;padding-top: 55px;padding-bottom: 0px">
          <MyButton class="el-button1"></MyButton>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  mode: 'history',
  name: 'App',
  created() {
    // location.reload();
  }
  /*created(){
    console.log(this.$store.state)
    sessionStorage.setItem('state',JSON.stringify(this.$store.state))
    //页面刷新事件监听器
    window.addEventListener('beforeunload',this.saveState())
  },
  methods:{
    saveState(){
      //将state转换为字符串并放入sessionStorage中
      console.log(this.$store.state)
      sessionStorage.setItem('state',JSON.stringify(this.$store.state))
    }
  }*/
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  width: 100%;
  color: #2c3e50;
  /*margin-top: 60px;*/
  /*margin: 0 auto;*/
}

.el-button1 {
  padding: 0;
  margin: 0;
}
</style>
